﻿<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace="DepartmentOperation"
  xmlns="http://ibatis.apache.org/mapping"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <!--模块配置-->
  <alias> 
    <typeAlias alias="DepartmentInfo" type="DataAccess.Models.DepartmentInfo"/> 
  </alias>

  <resultMaps> 

    <resultMap id="SelectAllDepartment" class="DepartmentInfo">
      <result property="ID" column="id"/>
      <result property="DepartmentName" column="department_name"/>
    </resultMap> 

  </resultMaps>

  <!--Statement配置-->
  <statements>
    
    <!--=================================================部门==================================================-->

    <!--获取所有部门信息-->
    <select id="GetAllDepartment" resultMap="SelectAllDepartment" resultClass="DepartmentInfo">
      <![CDATA[
             select id,department_name from departmentinfo 
             ]]>
    </select>

    <!--=======================================================================================================--> 

  </statements>
</sqlMap>
